package eco2automotive.gui.components;
import java.awt.*;
import javax.swing.*;
import eco2automotive.gui.actions.*;
/** JPanel object display the QUICKs actions with JButton objects.
  * @version 1.0
  * @autor Fco. Javier Sánchez Esparza
 */
public class Panel_ACTIONS extends JPanel {
    
    private JButton btnINI;
    private JButton btnRV;    
    private JButton btnMONITORPIDS;     
    private JButton btnDTCs;
    private JButton btnResetDTCs;    
    private JButton btnKMHRPM;
    private JButton btnQSTANDAR;
    
    JPanel PANEL_IFACE_ACTIONS;
    JPanel PANEL_MONITOR_ACTIONS;        
    JPanel PANEL_DTCs_ACTIONS;
    
  /**
     * JFrame parent
     * @param parent JFrame
     */
    public Panel_ACTIONS(JFrame parent){
    setBorder(new javax.swing.border.TitledBorder("Quick Actions"));          
    btnINI= new JButton("Init IC");
    btnINI.addActionListener(new Act_btn_INITBUS(parent));    
    btnRV=new JButton("R.Battery Voltage");    
    btnRV.addActionListener(new Act_btn_RV(parent));
    btnMONITORPIDS= new JButton("Monitor ALL");
    btnMONITORPIDS.addActionListener(new Act_btn_MONITOR(parent));    
    btnDTCs= new JButton("Query DTCs");
    btnDTCs.addActionListener(new Act_btn_DTCS_QUERY(parent));
    btnResetDTCs= new JButton("Clear DTC´s");
    btnResetDTCs.addActionListener(new Act_btn_DTCS_RESET(parent));
    btnKMHRPM= new JButton("Monitor KMH/RPM");
    btnKMHRPM.addActionListener(new Act_btn_KMHRPM(parent));
    btnQSTANDAR=new JButton("Vehicle Standar?");
    btnQSTANDAR.addActionListener(new Act_btn_VEHIC_STANDAR(parent));
        
    this.setLayout (new GridLayout(3/*4*/,1,2,2));         
    
    PANEL_IFACE_ACTIONS=new JPanel();
    PANEL_IFACE_ACTIONS.setBorder(new javax.swing.border.TitledBorder("Interface Quick Actions"));
    PANEL_IFACE_ACTIONS.setLayout(new FlowLayout(FlowLayout.LEFT));
    PANEL_IFACE_ACTIONS.add(btnINI);
    PANEL_IFACE_ACTIONS.add(btnRV);
    PANEL_IFACE_ACTIONS.add(btnQSTANDAR);
    this.add(PANEL_IFACE_ACTIONS);
    
    
    PANEL_MONITOR_ACTIONS=new JPanel();
    PANEL_MONITOR_ACTIONS.setBorder(new javax.swing.border.TitledBorder("Monitoring Actions"));
    PANEL_MONITOR_ACTIONS.setLayout(new FlowLayout(FlowLayout.LEFT));
    PANEL_MONITOR_ACTIONS.add(btnMONITORPIDS);
    PANEL_MONITOR_ACTIONS.add(btnKMHRPM);
    this.add(PANEL_MONITOR_ACTIONS);
           
    PANEL_DTCs_ACTIONS=new JPanel();
    PANEL_DTCs_ACTIONS.setBorder(new javax.swing.border.TitledBorder("Diagnostic of Trouble Codes"));
    PANEL_DTCs_ACTIONS.setLayout(new FlowLayout(FlowLayout.LEFT));
    PANEL_DTCs_ACTIONS.add(btnDTCs);
    PANEL_DTCs_ACTIONS.add(btnResetDTCs);   
    this.add(PANEL_DTCs_ACTIONS);
    }
    
    
}
